home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / include / X11 / Xaw / AsciiSrc.h < prev    next >
C/C++ Source or Header  |  2006-04-12  |  4KB  |  176 lines

  1. /* $Xorg: AsciiSrc.h,v 1.4 2001/02/09 02:03:42 xorgcvs Exp $ */
  2.  
  3. /*
  4.  
  5. Copyright 1989, 1994, 1998  The Open Group
  6.  
  7. Permission to use, copy, modify, distribute, and sell this software and its
  8. documentation for any purpose is hereby granted without fee, provided that
  9. the above copyright notice appear in all copies and that both that
  10. copyright notice and this permission notice appear in supporting
  11. documentation.
  12.  
  13. The above copyright notice and this permission notice shall be included in
  14. all copies or substantial portions of the Software.
  15.  
  16. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  17. IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  18. FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
  19. OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
  20. AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  21. CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  22.  
  23. Except as contained in this notice, the name of The Open Group shall not be
  24. used in advertising or otherwise to promote the sale, use or other dealings
  25. in this Software without prior written authorization from The Open Group.
  26.  
  27. */
  28. /* $XFree86: xc/lib/Xaw/AsciiSrc.h,v 1.7 2001/01/17 19:42:25 dawes Exp $ */
  29.  
  30.  
  31. /*
  32.  * AsciiSrc.h - Public Header file for Ascii Text Source.
  33.  *
  34.  * This is the public header file for the Ascii Text Source.
  35.  * It is intended to be used with the Text widget, the simplest way to use
  36.  * this text source is to use the AsciiText Object.
  37.  *
  38.  * Date:    June 29, 1989
  39.  *
  40.  * By:      Chris D. Peterson
  41.  *          MIT X Consortium 
  42.  *          kit@expo.lcs.mit.edu
  43.  */
  44.  
  45.  
  46. #ifndef _XawAsciiSrc_h
  47. #define _XawAsciiSrc_h
  48.  
  49. #include <X11/Xaw/TextSrc.h>
  50.  
  51. /* Resources:
  52.  
  53.  Name             Class        RepType        Default Value
  54.  ----             -----        -------        -------------
  55.  dataCompression     DataCompression    Boolean        True
  56.  length             Length        int        (internal)
  57.  pieceSize         PieceSize        int        BUFSIZ
  58.  string             String        String        NULL
  59.  type             Type        XawAsciiType    XawAsciiString
  60.  useStringInPlace    UseStringInPlace    Boolean        False
  61.  
  62. */
  63.  
  64. extern WidgetClass asciiSrcObjectClass;
  65.  
  66. typedef struct _AsciiSrcClassRec *AsciiSrcObjectClass;
  67. typedef struct _AsciiSrcRec      *AsciiSrcObject;
  68.  
  69. #define AsciiSourceObjectClass AsciiSrcObjectClass
  70. #define AsciiSourceObject      AsciiSrcObject
  71.  
  72. /*
  73.  * Resource Definitions
  74.  */
  75. #define XtCDataCompression "DataCompression"
  76. #define XtCPieceSize "PieceSize"
  77. #define XtCType "Type"
  78. #define XtCUseStringInPlace "UseStringInPlace"
  79.  
  80. #define XtNdataCompression "dataCompression"
  81. #define XtNpieceSize "pieceSize"
  82. #define XtNtype "type"
  83. #define XtNuseStringInPlace "useStringInPlace"
  84.  
  85. #define XtRAsciiType "AsciiType"
  86.  
  87. #define XtEstring "string"
  88. #define XtEfile "file"
  89.  
  90. typedef enum {
  91.   XawAsciiFile,
  92.   XawAsciiString
  93. } XawAsciiType;
  94.  
  95. /*
  96.  * Public routines
  97.  */
  98.  
  99. _XFUNCPROTOBEGIN
  100.  
  101. /*
  102.  * Function:
  103.  *    XawAsciiSourceFreeString
  104.  *
  105.  * Parameters:
  106.  *    w - AsciiSrc object
  107.  *
  108.  * Description:
  109.  *      Frees the string returned by a get values call
  110.  *             on the string when the source is of type string.
  111.  */
  112. void XawAsciiSourceFreeString
  113. (
  114.  Widget        w
  115.  );
  116.  
  117. /*
  118.  * Function:
  119.  *    XawAsciiSave
  120.  *
  121.  * Arguments:
  122.  *    w - asciiSrc Object.
  123.  *
  124.  * Description:
  125.  *    Saves all the pieces into a file or string as required.
  126.  *
  127.  * Returns:
  128.  *    True if the save was successful
  129.  */
  130. Bool XawAsciiSave
  131. (
  132.  Widget        w
  133.  );
  134.  
  135. /*
  136.  * Function:
  137.  *    XawAsciiSaveAsFile
  138.  *
  139.  * Parameters:
  140.  *    w    - asciiSrc object
  141.  *    name - name of the file to save this file into
  142.  *
  143.  * Description:
  144.  *    Save the current buffer as a file.
  145.  *
  146.  * Returns:
  147.  *    True if the save was successful
  148.  */
  149. Bool XawAsciiSaveAsFile
  150. (
  151.  Widget        w,
  152.  _Xconst char    *name
  153.  );
  154.  
  155. /*
  156.  * Function:
  157.  *    XawAsciiSourceChanged
  158.  *
  159.  * Parameters:
  160.  *    w - asciiSource object
  161.  *
  162.  * Description:
  163.  *    Returns true if the source has changed since last saved.
  164.  *
  165.  * Returns:
  166.  *    a Boolean (see description)
  167.  */
  168. Bool XawAsciiSourceChanged
  169. (
  170.  Widget        w
  171.  );
  172.  
  173. _XFUNCPROTOEND
  174.  
  175. #endif /* _XawAsciiSrc_h */
  176.